package main.validator.impl;

import java.util.Map;

import main.validator.Validator;


public class RequiredValidator implements Validator {


	public boolean check(Map<String, String> attributes, String value) {
		
		if(null == value || 0 == value.trim().length()){
			return false;
		}
		else{
			return true;
		}
	}


	public boolean check(Map<String, String> attributes, String[] values) {
		if(null == values){
			return false;
		}
		
		for(String aValue: values){
			if(false == this.check(attributes, aValue)){
				return false;
			}
		}
		
		return true;
	}
}
